package com.ld.caodan.client;

import java.io.IOException;
import java.io.InputStream;

import org.apache.http.client.ClientProtocolException;

/**
 * 
 * 
 * @author 刘笛 2011-9-19 下午04:08:58
 */
public interface IClient {

    InputStream doPost(String url) throws ClientProtocolException, IOException;
    
    /**
     * get请求
     * @param url
     * @return
     * @throws ClientProtocolException
     * @throws IOException
     */
    InputStream doGet(String url) throws ClientProtocolException, IOException;

    InputStream doDelete(String url) throws ClientProtocolException,
	    IOException;

    InputStream doPut(String url) throws ClientProtocolException, IOException;

    InputStream doHead(String url) throws ClientProtocolException, IOException;

    InputStream doOptions(String url) throws ClientProtocolException,
	    IOException;
    
    public enum ClientType{
	URLClient("URL"),HTTPClient("HTTP");
	private String type;
	
	private ClientType(String type) {
	    this.type = type;
	}
	@Override
	public String toString() {
	    return type;
	}
	
    }
}
